﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DataBase.Daihoctuonglai;

namespace dai_hoc_tuong_lai.Areas.Admin.Models
{
    public class UserModel
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Email { get; set; }
        public string Pass { get; set; }
        public string chucvu { get; set; }


        public string PassNew { get; set; }
        public string EmailNew { get; set; }

        public List<MoreInfoRoles> ModelCheck { get; set; }

        public static void MapFrom(UserModel model, ref Usser entity)
        {
            entity.Id = model.Id;
            entity.Name = model.Name;
            entity.Email = model.Email;
            entity.Pass = model.Pass;
            entity.chucvu = model.chucvu;
        }

        public static void MapFrom(Usser entity, ref UserModel model)
        {
            model.Id = entity.Id;
            model.Name = entity.Name;
            model.Email = entity.Email;
            model.Pass = entity.Pass;
            model.chucvu = entity.chucvu;
           
        }
    }

    public class MoreInfoRoles
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public bool Checkbox { get; set; }
    }
}